Skip to content

Conversation

@AswinRajGopal
Copy link
Collaborator

Description

Bug: https://jira.unity3d.com/browse/ISXB-1674
Port: 1.14.X

Preserve original tokens and only touch the enum values. That means processor names, order, legacy processors, and formatting survive unchanged so the editor no longer collapses or marks them “Obsolete”.
Avoid whole string rewrites, which previously caused mismatches between what the editor expected and what was written back and only assign a new processor string if something actually changed.

Testing status & QA

Verified manually with the attached repro project.

Overall Product Risks

Complexity: 0
Halo Effect: 0

Comments to reviewers

Checklist

Before review:

  • Changelog entry added.
    • Explains the change in Changed, Fixed, Added sections.
    • For API change contains an example snippet and/or migration example.
    • JIRA ticket linked, example (case %%). If it is a private issue, just add the case ID without a link.
    • Jira port for the next release set as "Resolved".
  • Tests added/changed, if applicable.
    • Functional tests Area_CanDoX, Area_CanDoX_EvenIfYIsTheCase, Area_WhenIDoX_AndYHappens_ThisIsTheResult.
    • Performance tests.
    • Integration tests.
  • Docs for new/changed API's.
    • Xmldoc cross references are set correctly.
    • Added explanation how the API works.
    • Usage code examples added.
    • The manual is updated, if needed.

During merge:

  • Commit message for squash-merge is prefixed with one of the list:
    • NEW: ___.
    • FIX: ___.
    • DOCS: ___.
    • CHANGE: ___.
    • RELEASE: 1.1.0-preview.3.

After merge:

  • Create forward/backward port if needed. If you are blocked from creating a forward port now please add a task to ISX-1444.

@codecov-github-com
Copy link

codecov-github-com bot commented Sep 25, 2025

Codecov Report

Attention: Patch coverage is 91.22807% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...UITKAssetEditor/Views/NameAndParametersListView.cs 25.00% 3 Missing ⚠️
...nputsystem/InputSystem/Actions/InputActionAsset.cs 96.77% 1 Missing ⚠️
...tsystem/InputSystem/Utilities/NameAndParameters.cs 87.50% 1 Missing ⚠️
@@             Coverage Diff             @@
##           develop    #2244      +/-   ##
===========================================
+ Coverage    76.70%   76.86%   +0.15%     
===========================================
  Files          465      476      +11     
  Lines        87919    88671     +752     
===========================================
+ Hits         67442    68153     +711     
- Misses       20477    20518      +41     
Flag Coverage Δ
inputsystem_MacOS_2021.3 5.93% <0.00%> (+0.01%) ⬆️
inputsystem_MacOS_2022.3 5.39% <0.00%> (+0.02%) ⬆️
inputsystem_MacOS_2022.3_project 74.73% <9.30%> (+0.15%) ⬆️
inputsystem_MacOS_6000.0 5.18% <0.00%> (-0.01%) ⬇️
inputsystem_MacOS_6000.0_project 76.64% <91.22%> (+0.13%) ⬆️
inputsystem_MacOS_6000.2 5.18% <0.00%> (-0.01%) ⬇️
inputsystem_MacOS_6000.2_project 76.64% <91.22%> (+0.13%) ⬆️
inputsystem_MacOS_6000.3 5.18% <0.00%> (-0.01%) ⬇️
inputsystem_MacOS_6000.3_project 76.64% <91.22%> (+0.13%) ⬆️
inputsystem_MacOS_6000.4 5.19% <0.00%> (+<0.01%) ⬆️
inputsystem_MacOS_6000.4_project 76.65% <91.22%> (+0.15%) ⬆️
inputsystem_MacOS_6000.5 5.19% <0.00%> (?)
inputsystem_MacOS_6000.5_project 76.65% <91.22%> (?)
inputsystem_Ubuntu_2021.3 5.93% <0.00%> (+0.01%) ⬆️
inputsystem_Ubuntu_2022.3 5.40% <0.00%> (+0.02%) ⬆️
inputsystem_Ubuntu_2022.3_project 74.53% <9.30%> (+0.14%) ⬆️
inputsystem_Ubuntu_6000.0 5.19% <0.00%> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.0_project 76.44% <91.22%> (+0.12%) ⬆️
inputsystem_Ubuntu_6000.2 5.19% <0.00%> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.2_project 76.44% <91.22%> (+0.12%) ⬆️
inputsystem_Ubuntu_6000.3 5.19% <0.00%> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.3_project 76.44% <91.22%> (+0.12%) ⬆️
inputsystem_Ubuntu_6000.4 5.19% <0.00%> (+<0.01%) ⬆️
inputsystem_Ubuntu_6000.4_project 76.46% <91.22%> (+0.14%) ⬆️
inputsystem_Ubuntu_6000.5 5.19% <0.00%> (?)
inputsystem_Ubuntu_6000.5_project 76.46% <91.22%> (?)
inputsystem_Windows_2021.3 5.93% <0.00%> (+0.01%) ⬆️
inputsystem_Windows_2022.3 5.39% <0.00%> (+0.02%) ⬆️
inputsystem_Windows_2022.3_project 74.86% <9.30%> (+0.13%) ⬆️
inputsystem_Windows_6000.0 5.18% <0.00%> (-0.01%) ⬇️
inputsystem_Windows_6000.0_project 76.77% <91.22%> (+0.12%) ⬆️
inputsystem_Windows_6000.2 5.18% <0.00%> (-0.01%) ⬇️
inputsystem_Windows_6000.2_project 76.77% <91.22%> (+0.12%) ⬆️
inputsystem_Windows_6000.3 5.18% <0.00%> (-0.01%) ⬇️
inputsystem_Windows_6000.3_project 76.77% <91.22%> (+0.12%) ⬆️
inputsystem_Windows_6000.4 5.19% <0.00%> (+<0.01%) ⬆️
inputsystem_Windows_6000.4_project 76.77% <91.22%> (+0.13%) ⬆️
inputsystem_Windows_6000.5 5.19% <0.00%> (?)
inputsystem_Windows_6000.5_project 76.77% <91.22%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ests/InputSystem.Editor/CustomProcessorEnumTest.cs 89.65% <100.00%> (+10.10%) ⬆️
...nputsystem/InputSystem/Actions/InputActionAsset.cs 85.50% <96.77%> (+11.41%) ⬆️
...tsystem/InputSystem/Utilities/NameAndParameters.cs 92.59% <87.50%> (-0.56%) ⬇️
...UITKAssetEditor/Views/NameAndParametersListView.cs 65.38% <25.00%> (-0.98%) ⬇️

... and 23 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ekcoh ekcoh changed the title Regression Fix: ISXB-1674 - Input actions asset not converted correctly when upgrading from 1.14.1 FIX: ISXB-1674 - Input actions asset not converted correctly when upgrading from 1.14.1 (Regression) Oct 2, 2025
@ekcoh
Copy link
Collaborator

ekcoh commented Oct 2, 2025

I noticed this PR title was incorrect so I changed it to remove that failure.

Copy link
Collaborator

@ekcoh ekcoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking into this, my main comment at this review round is to add inline comments explaining why we need to do the different parts since it is not clear to me from the code. I think this is important to make sure its maintainable.

Copy link
Collaborator

@LeoUnity LeoUnity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few things you mention in the PR description that I don't understand why they are needed:

Preserve original tokens and only touch the enum values

Formatting survive unchanged
I don't understand why this would be a requirement, I believe that if the user uses our editor to edit the asset that was written manually and has custom formatting that will overwrite the users formatting. Trying to parse json with string replaces, regex is a losing battle, the only way this won't be brittle is by parsing it, converting the data and serializing it back to json.

Avoid whole string rewrites, which previously caused mismatches between what the editor expected
As above, I don't understand why do we want to avoid string rewrites, my current thinking is that we didnt catch this for 2 reasons, we are not reusing the parsing and serializing funcitons that is used elsewhere, and we didnt test this case.

I believe the proper way of moving forward here is that we use the exact same code to parse and serialize json for this type that is used elsewhere in the editor, if we try to do anything different we are creating an opportunity for a bug to be hidden here.

Copy link
Collaborator

@ekcoh ekcoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as @LeoUnity, let's complement the test by making sure it parses correctly (logically) and then we can conclude this I believe.

Copy link
Collaborator

@LeoUnity LeoUnity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing an automated test case that reproduces the issue we are trying to fix here.

@AswinRajGopal AswinRajGopal requested a review from ekcoh October 16, 2025 09:10
Copy link
Collaborator

@LeoUnity LeoUnity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR looks good, there are a few failing CI jobs.

@ericksson
Copy link

The Android jobs are broken and stuck - see https://unity.slack.com/archives/C94RMJJ5T/p1760644095487229

Follow that thread to see when Lukas has a fix for the issue. Please refrain from rerunning the tests until the fix is available and you have it merged in this branch.

@ekcoh
Copy link
Collaborator

ekcoh commented Oct 21, 2025

Merged develop into this branch to get critical CI fix from #2260. Hope this doesn't caused any inconvenience for you.

@LeoUnity LeoUnity removed the request for review from relmgmt-service-user October 24, 2025 09:43
@ekcoh ekcoh requested a review from Pauliusd01 October 28, 2025 08:42
@ekcoh
Copy link
Collaborator

ekcoh commented Oct 28, 2025

Added @Pauliusd01 for QA approval

@Pauliusd01
Copy link
Collaborator

Did not forget this one, looking at it today/tomorrow

Copy link
Collaborator

@Pauliusd01 Pauliusd01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to fix assets that were already broken by the regression. Is there a way you can fix them as well? If not is there a workaround we can offer? I tried downgrading and then upgrading back to your version but that doesn't fix it.

@ekcoh @LeoUnity do you have any opinions about this?

@AswinRajGopal
Copy link
Collaborator Author

AswinRajGopal commented Oct 31, 2025 via email

@LeoUnity
Copy link
Collaborator

I didn't consider that, I'd say let's land this as it is and do a release ASAP to reduce the window in which users can end up with a corrupted asset.

There is something we could do, but if nobody complains I'm not sure it's worth it. Worst case scenario users can edit the file manually and correct the ";" to ",".

@Pauliusd01
Copy link
Collaborator

I didn't consider that, I'd say let's land this as it is and do a release ASAP to reduce the window in which users can end up with a corrupted asset.

There is something we could do, but if nobody complains I'm not sure it's worth it. Worst case scenario users can edit the file manually and correct the ";" to ",".

Okay that does work, I'll mention this as a known issue on the next release

@Pauliusd01 Pauliusd01 self-requested a review October 31, 2025 09:38
Copy link
Collaborator

@Pauliusd01 Pauliusd01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, tried upgrading from an older version to this one and checked basic input action editor and player functionality.

@Pauliusd01 Pauliusd01 merged commit 9427975 into develop Oct 31, 2025
130 checks passed
@Pauliusd01 Pauliusd01 deleted the isxb-1678/fix-customprocessor-serialise-regression branch October 31, 2025 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants